﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using DevDL.UserLimit.Models;
using DevDL.UserLimit.BLL;

namespace XinYuan.Service
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码、svc 和配置文件中的类名“RoleService”。
    public class RoleService : IRoleService
    {
        DevDL.UserLimit.BLL.RoleBLL roleBll = new RoleBLL();
        public int AddRole(Role role)
        {
            return roleBll.AddRole(role);
        }

        public System.Data.DataSet GetRoles()
        {
            return roleBll.GetRoles();
        }


        public int UpdateRoleDataSet(System.Data.DataSet ds, int tableIndex)
        {
            return roleBll.UpdateRoleDataSet(ds, tableIndex);
        }


        public int Insert(Role role)
        {
            return roleBll.Insert(role);
        }


        public int Update(Role role)
        {
            return roleBll.Update(role);
        }


        public int Delete(int roleId)
        {
            return roleBll.Delete(roleId);
        }


        public int UpdateFunction(Role role)
        {
            return roleBll.UpdateFunction(role);
        }



        public string GetFunctionById(int id)
        {
            return roleBll.GetFunctionById(id);
        }


        public string GetFunctionByOperatorId(int id)
        {
            return roleBll.GetFunctionByOperatorId(id);
        }
    }
}
